package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.Exam01.Bai1.Bai2;

/**
 * Created by Sang on 07/03/2016.
 */
public class StudentsModel {
    public String PrintStudentInfo(StudentEntity object) {
        return
                "My Fullname is " + object.getFullName() +
                        "\n has Rollno " + object.getRollNo() +
                        "\n sex is " + object.isSex() +
                        "\n email : " + object.getEmail() +
                        "\n mobiles : " + object.getEmail() +
                        "\n address : " + object.getAddress() +
                        "\n mark : " + object.getMark();

    }

    public String CheckMark(StudentEntity object) {
        if (object.getMark() >= 9) {
            return "Dat loai Gioi";
        } else if (object.getMark() >= 7.5 && object.getMark() < 9) {
            return "Dat loai  Kha !";
        } else if (object.getMark() <= 5 && object.getMark() <= 7) {
            return " Dat loai Trung Binh !";
        } else
            return "Dat loai Kem !";
    }


    public boolean CompareTo(StudentEntity obj1, StudentEntity obj2) {
        if (obj1.getMark() == obj2.getMark()) {
            System.out.println("Bang diem ");
            return true;
        } else {

            System.out.println("Khong bang diem");
            return false;
        }
    }
}
